package com.company.zuoye;

import java.util.concurrent.ArrayBlockingQueue;

public class ZuoYe3 {
    public static void main(String[] args) {
        String str = "abcdefg";
        new Thread(()->{
            for (int i = 0; i < str.length(); i++) {
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println(str.charAt(i));
            }
        }).start();
    }
}
class HanBao{
    private boolean shu = false;

    public void setShu(boolean shu) {
        this.shu = shu;
    }

    public boolean isShu() {
        return shu;
    }

    @Override
    public String toString() {
        return "HanBao{" +
                "shu=" + shu +
                '}';
    }
}
class DianYuan extends Thread{
    private String dname;

    public DianYuan(String dname) {
        this.dname = dname;
    }

    @Override
    public void run() {
        super.run();
    }
}
class KaoXiang extends Thread{
//    private ArrayBlockingQueue<HanBao> q = new ArrayBlockingQueue<>();
}